---------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/ekimbrough/Dropbox (Personal)/Alliances/Experimental Paper/JEPS Final/Replication_Regressio
> ns_JEPS.log
  log type:  text
 opened on:  31 May 2018, 09:52:31

. 
. use "~/Dropbox (Personal)/Alliances/Experimental Paper/JEPS Final/Individual_Data_JEPS.dta"
(Written by R.              )

. 
. gen invpd = 1/period

. label variable invpd "1/Period"

. 
. xtset id period
       panel variable:  id (strongly balanced)
        time variable:  period, 1 to 21
                delta:  1 unit

. 
. gen fullchat = full*chat

. gen fullpd = full*invpd

. gen chatpd = chat*invpd

. gen fullchatpd = full*chat*invpd

. 
. 
. //compute Fisher's z-transform of the alliance and egalitarian/bandwagon strategies
. 
. gen z_alliance = 0.5*ln((1+alliance)/(1-alliance))
(200 missing values generated)

. gen z_egal_band = 0.5*ln((1+egalitarian_bandwagon)/(1-egalitarian_bandwagon))
(200 missing values generated)

. 
. // Reproduce estimates from Table 1
. 
. xtreg z_alliance full chat fullchat ,re vce(cluster session)

Random-effects GLS regression                   Number of obs      =      4000
Group variable: id                              Number of groups   =       200

R-sq:  within  = 0.0000                         Obs per group: min =        20
       between = 0.1485                                        avg =      20.0
       overall = 0.0413                                        max =        20

                                                Wald chi2(3)       =     14.81
corr(u_i, X)   = 0 (assumed)                    Prob > chi2        =    0.0020

                               (Std. Err. adjusted for 25 clusters in session)
------------------------------------------------------------------------------
             |               Robust
  z_alliance |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        full |   .2198367   .1267861     1.73   0.083    -.0286595     .468333
        chat |  -.1789156     .07931    -2.26   0.024    -.3343604   -.0234707
    fullchat |   .0580155   .1543018     0.38   0.707    -.2444105    .3604415
       _cons |    .233091   .0520203     4.48   0.000     .1311331    .3350489
-------------+----------------------------------------------------------------
     sigma_u |  .31886629
     sigma_e |  .61565012
         rho |  .21151559   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. eststo
(est1 stored)

. 
. xtreg z_alliance full chat invpd fullchat fullpd chatpd fullchatpd, re vce(cluster session)

Random-effects GLS regression                   Number of obs      =      4000
Group variable: id                              Number of groups   =       200

R-sq:  within  = 0.0375                         Obs per group: min =        20
       between = 0.1485                                        avg =      20.0
       overall = 0.0684                                        max =        20

                                                Wald chi2(7)       =     39.88
corr(u_i, X)   = 0 (assumed)                    Prob > chi2        =    0.0000

                               (Std. Err. adjusted for 25 clusters in session)
------------------------------------------------------------------------------
             |               Robust
  z_alliance |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        full |   .3707166   .1795464     2.06   0.039     .0188121     .722621
        chat |  -.2573291   .1132819    -2.27   0.023    -.4793577   -.0353006
       invpd |  -.5641712   .2949216    -1.91   0.056    -1.142207    .0138646
    fullchat |   .0507699   .2264076     0.22   0.823    -.3929809    .4945207
      fullpd |  -1.140714   .4819879    -2.37   0.018    -2.085393   -.1960345
      chatpd |   .5928388   .3661122     1.62   0.105    -.1247279    1.310406
  fullchatpd |   .0547799   .6565276     0.08   0.934    -1.231991     1.34155
       _cons |   .3077127   .0805749     3.82   0.000     .1497889    .4656366
-------------+----------------------------------------------------------------
     sigma_u |  .31994928
     sigma_e |   .6043083
         rho |  .21894175   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. eststo
(est2 stored)

. 
. xtreg z_egal_band full chat fullchat ,re vce(cluster session)

Random-effects GLS regression                   Number of obs      =      4000
Group variable: id                              Number of groups   =       200

R-sq:  within  =      .                         Obs per group: min =        20
       between = 0.0754                                        avg =      20.0
       overall = 0.0156                                        max =        20

                                                Wald chi2(3)       =      3.59
corr(u_i, X)   = 0 (assumed)                    Prob > chi2        =    0.3094

                               (Std. Err. adjusted for 25 clusters in session)
------------------------------------------------------------------------------
             |               Robust
 z_egal_band |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        full |   .0762453    .085709     0.89   0.374    -.0917413    .2442319
        chat |  -.1270109   .2009503    -0.63   0.527    -.5208662    .2668444
    fullchat |   .2211785    .234544     0.94   0.346    -.2385194    .6808763
       _cons |   .0000938   .0447296     0.00   0.998    -.0875746    .0877623
-------------+----------------------------------------------------------------
     sigma_u |  .34540486
     sigma_e |  .80666601
         rho |    .154938   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. eststo
(est3 stored)

. 
. xtreg z_egal_band full chat invpd fullchat fullpd chatpd fullchatpd, re vce(cluster session)

Random-effects GLS regression                   Number of obs      =      4000
Group variable: id                              Number of groups   =       200

R-sq:  within  = 0.0110                         Obs per group: min =        20
       between = 0.0754                                        avg =      20.0
       overall = 0.0243                                        max =        20

                                                Wald chi2(7)       =     43.35
corr(u_i, X)   = 0 (assumed)                    Prob > chi2        =    0.0000

                               (Std. Err. adjusted for 25 clusters in session)
------------------------------------------------------------------------------
             |               Robust
 z_egal_band |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        full |   -.012347   .1029869    -0.12   0.905    -.2141977    .1895036
        chat |  -.3138898   .2960366    -1.06   0.289    -.8941108    .2663312
       invpd |  -.0516511   .1039466    -0.50   0.619    -.2553828    .1520805
    fullchat |   .4619123   .3382571     1.37   0.172    -.2010594    1.124884
      fullpd |   .6697946   .2784014     2.41   0.016      .124138    1.215451
      chatpd |   1.412881   .7320633     1.93   0.054    -.0219367    2.847699
  fullchatpd |  -1.820047   .8555612    -2.13   0.033    -3.496916   -.1431776
       _cons |   .0069256   .0555902     0.12   0.901    -.1020291    .1158804
-------------+----------------------------------------------------------------
     sigma_u |  .34587572
     sigma_e |  .80262075
         rho |  .15661862   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. eststo
(est4 stored)

. 
. esttab , cells(b(star fmt(3)) se(par fmt(3))) star( * 0.05 ** 0.01 *** 0.001) scalars("N Obs." "chi2  Wald Ch
> i-Sq.") label replace notes 

------------------------------------------------------------------------------------
                              (1)             (2)             (3)             (4)   
                       z_alliance      z_alliance     z_egal_band     z_egal_band   
                             b/se            b/se            b/se            b/se   
------------------------------------------------------------------------------------
full                        0.220           0.371*          0.076          -0.012   
                          (0.127)         (0.180)         (0.086)         (0.103)   
chat                       -0.179*         -0.257*         -0.127          -0.314   
                          (0.079)         (0.113)         (0.201)         (0.296)   
fullchat                    0.058           0.051           0.221           0.462   
                          (0.154)         (0.226)         (0.235)         (0.338)   
1/Period                                   -0.564                          -0.052   
                                          (0.295)                         (0.104)   
fullpd                                     -1.141*                          0.670*  
                                          (0.482)                         (0.278)   
chatpd                                      0.593                           1.413   
                                          (0.366)                         (0.732)   
fullchatpd                                  0.055                          -1.820*  
                                          (0.657)                         (0.856)   
Constant                    0.233***        0.308***        0.000           0.007   
                          (0.052)         (0.081)         (0.045)         (0.056)   
------------------------------------------------------------------------------------
Observations                 4000            4000            4000            4000   
Wald Chi-Sq.                14.81           39.88           3.589           43.35   
------------------------------------------------------------------------------------

. 
. 
. // Reproduce estimates from Table A1
. //type1 = alliance, type2 = bandwagon, type3 = egalitarian, type4 = none
. 
. est clear

. drop if period==1
(200 observations deleted)

. mlogit type full chat fullchat, cluster(session) base(4)

Iteration 0:   log pseudolikelihood = -5321.7387  
Iteration 1:   log pseudolikelihood =  -5219.129  
Iteration 2:   log pseudolikelihood = -5217.4404  
Iteration 3:   log pseudolikelihood = -5217.4403  

Multinomial logistic regression                   Number of obs   =       4000
                                                  Wald chi2(9)    =      39.64
                                                  Prob > chi2     =     0.0000
Log pseudolikelihood = -5217.4403                 Pseudo R2       =     0.0196

                               (Std. Err. adjusted for 25 clusters in session)
------------------------------------------------------------------------------
             |               Robust
        type |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
1            |
        full |   .6337148   .2958759     2.14   0.032     .0538087    1.213621
        chat |  -.4107824   .2012959    -2.04   0.041    -.8053151   -.0162498
    fullchat |   .1093714   .3763546     0.29   0.771      -.62827    .8470128
       _cons |   .8137752   .1555856     5.23   0.000     .5088329    1.118717
-------------+----------------------------------------------------------------
2            |
        full |   .4988579   .1860688     2.68   0.007     .1341697    .8635461
        chat |   .3598334   .1707364     2.11   0.035     .0251963    .6944705
    fullchat |  -.3952594    .281588    -1.40   0.160    -.9471618    .1566429
       _cons |    .383866   .1104258     3.48   0.001     .1674353    .6002967
-------------+----------------------------------------------------------------
3            |
        full |   .1437537   .2191618     0.66   0.512    -.2857956    .5733029
        chat |   .5634096   .4294713     1.31   0.190    -.2783386    1.405158
    fullchat |  -.8031836   .4801983    -1.67   0.094    -1.744355    .1379877
       _cons |   .3573158   .1317587     2.71   0.007     .0990735    .6155581
-------------+----------------------------------------------------------------
4            |  (base outcome)
------------------------------------------------------------------------------

. eststo
(est1 stored)

. mlogit type full chat fullchat invpd fullpd chatpd fullchatpd, cluster(session) base(4)

Iteration 0:   log pseudolikelihood = -5321.7387  
Iteration 1:   log pseudolikelihood = -5142.9167  
Iteration 2:   log pseudolikelihood = -5139.3544  
Iteration 3:   log pseudolikelihood = -5139.3498  
Iteration 4:   log pseudolikelihood = -5139.3498  

Multinomial logistic regression                   Number of obs   =       4000
                                                  Wald chi2(18)   =          .
                                                  Prob > chi2     =          .
Log pseudolikelihood = -5139.3498                 Pseudo R2       =     0.0343

                               (Std. Err. adjusted for 25 clusters in session)
------------------------------------------------------------------------------
             |               Robust
        type |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
1            |
        full |    1.29481   .3169965     4.08   0.000     .6735084    1.916112
        chat |  -.4857296   .2730129    -1.78   0.075    -1.020825    .0493658
    fullchat |  -.2238693     .46644    -0.48   0.631    -1.138075    .6903363
       invpd |  -2.040559   .7437505    -2.74   0.006    -3.498283   -.5828345
      fullpd |  -5.050457   .9830408    -5.14   0.000    -6.977182   -3.123733
      chatpd |   .6971691   1.201069     0.58   0.562    -1.656883    3.051221
  fullchatpd |   2.281009   1.619948     1.41   0.159    -.8940309    5.456049
       _cons |   1.081301   .1919549     5.63   0.000     .7050763    1.457526
-------------+----------------------------------------------------------------
2            |
        full |   .5429234   .2767945     1.96   0.050     .0004162    1.085431
        chat |   .2978321   .2854214     1.04   0.297    -.2615835    .8572477
    fullchat |  -.4921847   .4089242    -1.20   0.229    -1.293661     .309292
       invpd |  -.8243916   .7477283    -1.10   0.270    -2.289912    .6411289
      fullpd |  -.1011495   1.063767    -0.10   0.924    -2.186095    1.983796
      chatpd |   .4782206   1.164058     0.41   0.681     -1.80329    2.759731
  fullchatpd |   .4516859   1.507039     0.30   0.764    -2.502057    3.405429
       _cons |   .4980634   .1842226     2.70   0.007     .1369938     .859133
-------------+----------------------------------------------------------------
3            |
        full |   .4970775   .2789429     1.78   0.075    -.0496406    1.043796
        chat |   1.050825   .6118932     1.72   0.086    -.1484633    2.250114
    fullchat |  -1.552878   .7132869    -2.18   0.029    -2.950895   -.1548618
       invpd |  -.1033264   .8058053    -0.13   0.898    -1.682676    1.476023
      fullpd |  -2.212302    1.63431    -1.35   0.176    -5.415491    .9908872
      chatpd |  -3.807582   1.929057    -1.97   0.048    -7.588465   -.0266995
  fullchatpd |   5.399883   2.634369     2.05   0.040     .2366143    10.56315
       _cons |    .372152    .107266     3.47   0.001     .1619145    .5823895
-------------+----------------------------------------------------------------
4            |  (base outcome)
------------------------------------------------------------------------------

. eststo
(est2 stored)

. 
. esttab , cells(b(star fmt(3)) se(par fmt(3))) star( * 0.05 ** 0.01 *** 0.001) scalars("N Obs." "chi2  Wald Ch
> i-Sq.") label replace notes 

----------------------------------------------------
                              (1)             (2)   
                             type            type   
                             b/se            b/se   
----------------------------------------------------
1                                                   
full                        0.634*          1.295***
                          (0.296)         (0.317)   
chat                       -0.411*         -0.486   
                          (0.201)         (0.273)   
fullchat                    0.109          -0.224   
                          (0.376)         (0.466)   
1/Period                                   -2.041** 
                                          (0.744)   
fullpd                                     -5.050***
                                          (0.983)   
chatpd                                      0.697   
                                          (1.201)   
fullchatpd                                  2.281   
                                          (1.620)   
Constant                    0.814***        1.081***
                          (0.156)         (0.192)   
----------------------------------------------------
2                                                   
full                        0.499**         0.543*  
                          (0.186)         (0.277)   
chat                        0.360*          0.298   
                          (0.171)         (0.285)   
fullchat                   -0.395          -0.492   
                          (0.282)         (0.409)   
1/Period                                   -0.824   
                                          (0.748)   
fullpd                                     -0.101   
                                          (1.064)   
chatpd                                      0.478   
                                          (1.164)   
fullchatpd                                  0.452   
                                          (1.507)   
Constant                    0.384***        0.498** 
                          (0.110)         (0.184)   
----------------------------------------------------
3                                                   
full                        0.144           0.497   
                          (0.219)         (0.279)   
chat                        0.563           1.051   
                          (0.429)         (0.612)   
fullchat                   -0.803          -1.553*  
                          (0.480)         (0.713)   
1/Period                                   -0.103   
                                          (0.806)   
fullpd                                     -2.212   
                                          (1.634)   
chatpd                                     -3.808*  
                                          (1.929)   
fullchatpd                                  5.400*  
                                          (2.634)   
Constant                    0.357**         0.372***
                          (0.132)         (0.107)   
----------------------------------------------------
4                                                   
full                        0.000           0.000   
                              (.)             (.)   
chat                        0.000           0.000   
                              (.)             (.)   
fullchat                    0.000           0.000   
                              (.)             (.)   
1/Period                                    0.000   
                                              (.)   
fullpd                                      0.000   
                                              (.)   
chatpd                                      0.000   
                                              (.)   
fullchatpd                                  0.000   
                                              (.)   
Constant                    0.000           0.000   
                              (.)             (.)   
----------------------------------------------------
Observations                 4000            4000   
Wald Chi-Sq.                39.64               .   
----------------------------------------------------

. 
. 
. log close
      name:  <unnamed>
       log:  /Users/ekimbrough/Dropbox (Personal)/Alliances/Experimental Paper/JEPS Final/Replication_Regressio
> ns_JEPS.log
  log type:  text
 closed on:  31 May 2018, 09:52:33
---------------------------------------------------------------------------------------------------------------
